const { http } = uni.$u

// 获取账单列表
export const getBillList = (data) => {
	return http.get('/api/bill/findAll', {params: data})
}

// 统计接口
export const getAnalyze = (data) => {
	return http.get('/api/bill/analyze', {params: data})
}

// 新增账单
export const addBill = (data, config)=> {
	return http.post(`/api/bill/add`, data, config)
}

// 编辑账单
export const updateBill = (data, config)=> {
	return http.put(`/api/bill/update/${data.id}`, data, config)
}

// 删除账单
export const deleteBill = (data, config)=> {
	return http.delete(`/api/bill/delete/${data.id}`, data, config)
}